﻿<Window x:Class="CECB.Member.V_MemberNew_Window"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="V_MemberNew_Window" 
         xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
       
          WindowStartupLocation="CenterScreen"   Background="#AA000000" 
        AllowsTransparency="True" WindowStyle="None" WindowState="Maximized"
        mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
    
    <Window.Resources>
        <ControlTemplate x:Key="AnimatedExpanderButtonTemp" TargetType="{x:Type ToggleButton}">
            <Border x:Name="ExpanderButtonBorder"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}"
                    >
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Rectangle Fill="Transparent"
                               Grid.ColumnSpan="2"/>
                    <Ellipse Name="Circle"
                         Grid.Column="0"
                         Stroke="DarkGray"
                         Width="20"
                         Height="20"
                         HorizontalAlignment="Center"
                         VerticalAlignment="Center"
                         />
                    <Path x:Name="Arrow"
                      Grid.Column="0"
                      Data="M 1,1.5 L 4.5,5 8,1.5"
                      Stroke="#FF666666"
                      StrokeThickness="2"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Center"
                      RenderTransformOrigin="0.5,0.5"
                      >
                        <Path.RenderTransform>
                            <RotateTransform Angle="0"/>
                        </Path.RenderTransform>
                    </Path>
                    <ContentPresenter x:Name="HeaderContent"
                                      Grid.Column="1"
                                      Margin="4,0,0,0"
                                      ContentSource="Content"/>
                </Grid>
            </Border>
            <ControlTemplate.Triggers>
                <!-- Animate arrow when toggled-->
                <Trigger Property="IsChecked"
                         Value="True">
                    <Trigger.EnterActions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="Arrow"
                                                 Storyboard.TargetProperty="(Path.RenderTransform).(RotateTransform.Angle)"
                                                 To="180"
                                                 Duration="0:0:0.4"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.EnterActions>
                    <Trigger.ExitActions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="Arrow"
                                                 Storyboard.TargetProperty="(Path.RenderTransform).(RotateTransform.Angle)"
                                                 To="0"
                                                 Duration="0:0:0.4"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.ExitActions>
                </Trigger>

                <!-- MouseOver, Pressed behaviours-->
                <Trigger Property="IsMouseOver"
                                 Value="true">
                    <Setter Property="Stroke"
                                    Value="#FF3C7FB1"
                                    TargetName="Circle"/>
                    <Setter Property="Stroke"
                                    Value="#222"
                                    TargetName="Arrow"/>
                </Trigger>
                <Trigger Property="IsPressed"
                                 Value="true">
                    <Setter Property="Stroke"
                                    Value="#FF526C7B"
                                    TargetName="Circle"/>
                    <Setter Property="StrokeThickness"
                                    Value="1.5"
                                    TargetName="Circle"/>
                    <Setter Property="Stroke"
                                    Value="#FF003366"
                                    TargetName="Arrow"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="StretchyExpanderTemp" TargetType="{x:Type Expander}">
            <DockPanel>
                <ToggleButton x:Name="ExpanderButton" 
                              DockPanel.Dock="Top"
                              Template="{StaticResource AnimatedExpanderButtonTemp}"
                              Content="{TemplateBinding Header}"
                              IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"
                              OverridesDefaultStyle="True"
                              Padding="1.5,0">
                </ToggleButton>
                <ContentPresenter x:Name="ExpanderContent"
                                  ContentSource="Content"
                                  DockPanel.Dock="Bottom"
                                  >
                    <ContentPresenter.LayoutTransform>
                        <ScaleTransform ScaleY="0"/>
                    </ContentPresenter.LayoutTransform>
                </ContentPresenter>
            </DockPanel>
            <ControlTemplate.Triggers>
                <Trigger Property="IsExpanded" Value="True">
                    <Trigger.EnterActions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="ExpanderContent"
                                                 Storyboard.TargetProperty="(ContentPresenter.LayoutTransform).(ScaleTransform.ScaleY)"                                                 
                                                 To="1"
                                                 Duration="0:0:0.4"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.EnterActions>
                    <Trigger.ExitActions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="ExpanderContent"
                                                 Storyboard.TargetProperty="(ContentPresenter.LayoutTransform).(ScaleTransform.ScaleY)"
                                                 To="0"
                                                 Duration="0:0:0.4"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.ExitActions>
                </Trigger>

            </ControlTemplate.Triggers>
        </ControlTemplate>


    </Window.Resources>
    
    <Grid Width="570" Height="570">
         
            <Rectangle Margin="5,0,-18,36" Stroke="White" RadiusY="19.5" RadiusX="19.5" StrokeThickness="4" Grid.RowSpan="2" Height="533" Width="582">
                <Rectangle.Effect>
                    <DropShadowEffect Direction="330" BlurRadius="24" ShadowDepth="13" />
                </Rectangle.Effect>
                <Rectangle.Fill>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="Black" Offset="0" />
                        <GradientStop Color="#FFA3A1A1" Offset="0.494" />
                        <GradientStop Color="#FF272121" Offset="0" />
                        <GradientStop Color="#FF272121" Offset="1" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <Label Content="Create a New Member" Height="38" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="30,10,10,0"   Width="auto" FontSize="20" FontStretch="Normal" FontStyle="Normal" FontWeight="Black" Foreground="#FFEFEFEF"  ></Label>
            <GroupBox Margin="30,50,0,50" Height="auto">
                <StackPanel Margin="20,20,0,0" Width="501" Height="auto">
                    <WrapPanel VerticalAlignment="Top" Height="auto" Orientation="Horizontal">
                        <Label Content=" " Height="1" HorizontalAlignment="Center" Margin="0,10,10,0"  VerticalAlignment="Center" Width="auto" FontSize="20" FontStretch="Normal" FontStyle="Normal" FontWeight="Black" Foreground="#FFEFEFEF"></Label>


                    </WrapPanel >


                    <WrapPanel VerticalAlignment="Top" Orientation="Horizontal">
                        <Label Content="Full Name" Height="28" Width="100" Name="label1" HorizontalAlignment="Left" Margin="25,0,0,0" VerticalAlignment="Top" FontSize="14" FontStyle="Italic" FontWeight="Medium" Foreground="White" BorderThickness="0" BorderBrush="White" />
                        <TextBox Height="30" HorizontalAlignment="Left" Margin="70,0,0,0" Name="textBox_FirstName" VerticalAlignment="Top" Width="250" FontSize="14" Foreground="#FF4E0000" Background="#FFFFE8A6" />
                    </WrapPanel>
                    <WrapPanel VerticalAlignment="Top" Orientation="Horizontal" Margin="0,5,0,0">
                        <Label Content="Address" Height="28" Width="100" Name="label5" HorizontalAlignment="Left" Margin="25,0,0,0" VerticalAlignment="Top" FontSize="14" FontStyle="Italic" FontWeight="Medium" Foreground="White" BorderThickness="0" BorderBrush="White" />
                        <TextBox Height="auto" HorizontalAlignment="Left" Margin="70,0,0,0" Name="textBox_Address" VerticalAlignment="Top" Width="250" MinHeight="30" MaxHeight="60" TextWrapping="Wrap" AcceptsReturn="True" FontSize="14" Foreground="#FF4E0000" Background="#FFFFE8A6" />

                    </WrapPanel>
                    <WrapPanel VerticalAlignment="Top" Orientation="Horizontal" Margin="0,5,0,0">
                        <Label Content="Designation" Height="28" Width="100" Name="label4" HorizontalAlignment="Left" Margin="25,0,0,0" VerticalAlignment="Top" FontSize="14" FontStyle="Italic" FontWeight="Medium" Foreground="White" BorderThickness="0" BorderBrush="White" />
                        <ComboBox Height="30" HorizontalAlignment="Left" Margin="70,0,0,0" Name="comboBox_Designation" VerticalAlignment="Top" Width="250" FontSize="14" Foreground="#FF4E0000" SelectionChanged="textBox_Designation_SelectionChanged" Background="#FFFFE8A6">
                            <ComboBoxItem Content="Team Leader" />
                            <ComboBoxItem Content="Consultent" />
                        </ComboBox>

                    </WrapPanel>
                    <StackPanel   Height="100" Name="stackPanel1" Width="600" >
                        <WrapPanel Orientation="Horizontal" Margin="0,10,0,0">
                            <Label Content="Specilization" Width="169" Height="28" Name="labele" HorizontalAlignment="Left" Margin="25,0,0,0" VerticalAlignment="Top" FontSize="14" FontStyle="Italic" FontWeight="Medium" Foreground="White" BorderThickness="0" BorderBrush="White" />
                            <Expander Template="{StaticResource StretchyExpanderTemp}" OverridesDefaultStyle="True" Foreground="White"  Header="  View speciliztion details" Height="auto"    HorizontalAlignment="Left" Margin="0,0,0,10" Name="expander1" VerticalAlignment="Top" Width="251" Background="{x:Null}">
                                <StackPanel Width="313" Height="150" Background="White" VerticalAlignment="Top" HorizontalAlignment="Left">

                                    <ListBox Name="listBoxSpec" Height="130" Width="350" Margin="0, 0,0,0" SelectionMode="Multiple" Background="#FFFFE8A6">
                                        <ListBox.ItemTemplate>
                                            <DataTemplate>
                                                <WrapPanel Orientation="Horizontal" Width="200" Height="30"    >
                                                    <CheckBox Name="chebox_spec" FontSize="14" Height="30"  IsChecked="{Binding Path=IsSelected,  RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"/>

                                                    <Label Content="{Binding spec_name}" Height="30" Width="180"   Foreground="Black"   HorizontalAlignment="Right" FontSize="14" Margin="0,-20 ,0,0" />
                                                </WrapPanel>
                                            </DataTemplate>
                                        </ListBox.ItemTemplate>
                                    </ListBox>

                                </StackPanel>
                            </Expander>
                        </WrapPanel>
                    </StackPanel>
                    <WrapPanel VerticalAlignment="Top" Name="wrapPanelUserLogin" Margin="0,5,0,0"></WrapPanel>
                    <WrapPanel VerticalAlignment="Top" Orientation="Horizontal">
                        <Label Content="Add Contact Numbers" Height="28" Width="150" Name="label12" HorizontalAlignment="Left" Margin="25,0,0,0" VerticalAlignment="Top" FontSize="14" FontStyle="Italic" FontWeight="Medium" Foreground="White" BorderThickness="0" BorderBrush="White" />
                        <TextBox Height="30" HorizontalAlignment="Left" Margin="19,5,0,0" Name="textBox_ContactNo1" VerticalAlignment="Top" Width="251" FontSize="14" Foreground="#FF4E0000" PreviewTextInput="textBox_ContactNo3_PreviewTextInput" TextChanged="textBox_ContactNo3_TextChanged" Background="#FFFFE8A6" />
                        <Button Background="{x:Null}" BorderBrush="White"   Height="35"   Name="button_addContact1" Width="28" Click="button_addContact1_Click" Margin="15,5,0,0">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Image Height="32" Margin="2,2,16,2" Source="/CECB;component/images/plusIcon.png" Width="18" />
                                <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Center"></StackPanel>
                            </Grid>
                        </Button>

                        <TextBox Height="30" HorizontalAlignment="Left" Margin="195,0,0,0" Background="#FFFFE8A6" Name="textBox_ContactNo2" VerticalAlignment="Top" Width="250" FontSize="14" Foreground="#FF4E0000" PreviewTextInput="textBox_ContactNo3_PreviewTextInput" TextChanged="textBox_ContactNo3_TextChanged" Visibility="Collapsed" />
                        <TextBox Height="30" HorizontalAlignment="Left" Margin="195,5,0,0" Background="#FFFFE8A6" Name="textBox_ContactNo3" VerticalAlignment="Top" Width="250" FontSize="14" Foreground="#FF4E0000" PreviewTextInput="textBox_ContactNo3_PreviewTextInput" TextChanged="textBox_ContactNo3_TextChanged" Visibility="Collapsed" />
                    </WrapPanel>
                    <WrapPanel VerticalAlignment="Top" Orientation="Horizontal">
                        <Label Content="Email Address" Height="28" Width="100" Name="label21" HorizontalAlignment="Left" Margin="25,0,0,0" VerticalAlignment="Top" FontSize="14" FontStyle="Italic" FontWeight="Medium" Foreground="White" BorderThickness="0" BorderBrush="White" />
                        <TextBox Height="30" HorizontalAlignment="Left" Margin="70,5,0,0" Name="textBox_Email1" VerticalAlignment="Top" Width="250" FontSize="14" Foreground="#FF4E0000" Background="#FFFFE8A6" />
                        <Button Background="{x:Null}" BorderBrush="White"   Height="35"   Name="button_addContact3" Width="28" Click="button_addContact3_Click" Margin="15,5,0,0">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Image Height="32" Margin="2,2,16,2" Source="/CECB;component/images/plusIcon.png" Width="18" />
                                <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Center"></StackPanel>
                            </Grid>
                        </Button>
                        <TextBox Height="30" HorizontalAlignment="Left" Margin="195,0,0,0" Background="#FFFFE8A6" Name="textBox_Email2" VerticalAlignment="Top" Width="250" FontSize="14" Foreground="#FF4E0000" Visibility="Collapsed" />
                    </WrapPanel>
                    <StackPanel Name="stackPanel14" Orientation="Horizontal" Margin="0,10,45,0" Width="215" HorizontalAlignment="Right"  >
                        <Button Background="{x:Null}" BorderBrush="White" Height="44" Margin="2,0" Name="NewButton" Width="98" Click="NewButton_Click">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Image Grid.Column="0" Height="32" Margin="2" Source="/CECB;component/images/sliderCancel.png" Width="32" />
                                <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Center">
                                    <TextBlock Margin="0,1,0,0 " Padding="0" Text="Clear
                                           " Foreground="White" TextWrapping="NoWrap" Height="21" />
                                </StackPanel>
                            </Grid>
                        </Button>
                        <Button Background="{x:Null}" BorderBrush="White" Click="SaveButton_Click" Height="44" Margin="2,0" Name="SaveButton" Width="98">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Image Grid.Column="0" Height="32" Margin="2" Source="/CECB;component/images/Save.png" Width="32" />
                                <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Center">
                                    <TextBlock Margin="0" Padding="0" Foreground="White" Text="Save" TextWrapping="NoWrap" />
                                </StackPanel>
                            </Grid>
                        </Button>
                    </StackPanel>
                </StackPanel>

            </GroupBox>

            <Button  VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,6,0,0" Width="42" Height="42" Name="ButtonClose" Click="ButtonClose_Click" >
                <Image Height="32" Source="/CECB;component/images/closeblack.png" Width="32"   />
            </Button>
             
    </Grid>
</Window>
